// 定义与Java中BaseResponse<T>对应的前端数据结构
export interface BaseResponse {
  code: number
  message: string
}

// 单个用户对象的ts类型
export interface Role {
  id: number
  roleName: string
  role: string
  createTime: string
}

export interface RoleAddRequest {
  roleName?: string
  role?: string
}

export interface RoleQueryRequest {
  roleName?: string
}

export interface RoleUpdateRequest {
  roleName?: string
  role?: string
}
export interface PageRole extends BaseResponse {
  data: {
    current?: number
    pages?: number
    records?: Array<Role>
    size?: number
    total?: number
  }
}

export interface DeleteRequest {
  id: number
}

// 单个菜单对象的ts类型
export interface MenuData {
  id: string
  createTime: string
  pid: number
  name: string
  permission: string
  level: number
  selected: boolean
  children?: MenuData[]
}

export interface RolePermissionAddRequest {
  roleId: number
  permissionIds: number[]
}
